package com.core;

import com.utility.PropertiesConjunction;
import com.utility.Utility;

import org.apache.commons.configuration.Configuration;


public class UserInfo {
	private Configuration configuration = PropertiesConjunction.getCoreConfiguration();
	
	final String DEFAULT_CLIENT_NAME = configuration.getString("com.core.client.defaultclientname","default_client_name");
	
	private Utility utility = new Utility();
	
	private String ClientName;
	private String ClientID;
//	to be added in derived classed (extra features for different environment)
//	String IP;
//	int port;
	
	
	public UserInfo(final String ClientName, final String ClientID) {
		if (ClientName == null) {
			this.ClientName = DEFAULT_CLIENT_NAME;
		}
		else {
			this.ClientName = ClientName; 
		}
		
		if (ClientID == null) {
			this.ClientID = utility.IDGenerator();
		}
		else {
			this.ClientID = ClientID;
		}
		
	}
	
	
	public String getClientName() {
		return ClientName;
	}
	
	public String getClientID() {
		return ClientID;
	}


}
